package exception;

public class ThrowDemo {
    public static void main(String[] args) throws Exception {
        Person p = new Person();
        try {
            p.setAge(3);
            p.setAge(888);
            System.out.println("此人的年龄是：" + p.getAge());
        } catch (IllegalAgeException e) {
//            throw new RuntimeException(e);
            e.printStackTrace();
        }
    }
}
